package com.caffedev.ottollotto;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;


public class OttollottoTab extends TabActivity {//implements AdHttpListener{

	private TabHost tabHost;
	//private MobileAdView adView = null;
	
	
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);

        setContentView(R.layout.tab);
        //initAdam();
/*    			AdConfig.setClientId("17f2Z0QT13409633393");
    			adView = (MobileAdView)findViewById(R.id.adview);
    			adView.setAdListener(this);
    			adView.setVisibility(View.VISIBLE);
    			*/
        Resources res = getResources();
        
        //tabHost = (TabHost)findViewById(R.id.tabhost);
        //tabHost = (TabHost)findViewById(android.R.)
        tabHost = (TabHost)findViewById(android.R.id.tabhost);
        	//tabHost = 	getTabHost();
        	
        tabHost.setup(getLocalActivityManager());
        
        tabHost.addTab(tabHost.newTabSpec(res.getString(R.string.app_name))
        		.setIndicator(res.getString(R.string.app_name),res.getDrawable(R.drawable.icon))
        		.setContent(new Intent(this,OttollottoMain.class)));
        tabHost.addTab(tabHost.newTabSpec(res.getString(R.string.tab_stats))
          		.setIndicator(res.getString(R.string.tab_stats), res.getDrawable(R.drawable.stats))
                  .setContent(new Intent(this, OttollottoStats.class)));
          
          tabHost.addTab(tabHost.newTabSpec(res.getString(R.string.tab_mynum))
            		.setIndicator(res.getString(R.string.tab_mynum), res.getDrawable(R.drawable.mynum))
                    .setContent(new Intent(this, OttollottoMyNum.class)));
          
      
        

      
      
     
    }
    
/*    private void initAdam(){
		//AdConfig.setClientId("TestClientId");
				AdConfig.setClientId("17f2Z0QT13409633393");
				adView = (MobileAdView)findViewById(R.id.adview);
				adView.setAdListener(this);
				adView.setVisibility(View.VISIBLE);
	}*/
	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
	/*	if(adView != null){
			adView.destroy();
			adView = null;
		}*/
	}

/*
	@Override
	public void didDownloadAd_AdListener() {
		// TODO Auto-generated method stub
		Log.e("ADAM","didDownloadAd_AdListener");
	}
	@Override
	public void failedDownloadAd_AdListener(int arg0, String arg1) {
		// TODO Auto-generated method stub
		Log.e("ADAM","failedDownloadAd_AdListener");
	}*/

}
